package cn.cimoc.service;

import cn.cimoc.model.dto.inut.CartInput;
import cn.cimoc.model.dto.output.CartDTO;

import java.util.List;

/**
 * @author LGZ
 * @date 2022/7/16 14:21
 * <p>
 */
public interface CartService {
    /**
     * 添加购物车
     * @param pid pid
     * @param amount amount
     * @param uid uid
     * @param username username
     */
    void addToCart(long pid, long amount, long uid, String username);

    /**
     * 获取购物车列表
     * @param uid uid
     * @return data
     */
    CartDTO[] getCartList(long uid);

    /**
     * 根据cid获取购物车
     * @param cids /
     * @return /
     */
    CartDTO[] getCartByCid(Long[] cids);
}
